<script type="text/javascript">
	alert("ola");
	var menu = "";
</script>
<?php
include "conecta_mysql.php";
//inicia sessao
session_start();
//recupera registros da sessao
$usu_id = $_SESSION[usuario_id];
echo "usuario = "+$usu_id;
//realiza a consulta no banco de dados
//$sql = "SELECT * FROM hot_t_usuario WHERE usu_id='$usu_id'";
$sql = "SELECT * FROM hot_vw_usu_fun WHERE usu_id='$usu_id'";

//$query = mysql_query($sql) or die ("Erro: ".mysql_error());
$query = mysql_query($sql) or die ("Erro: ".mysql_error());
/*
if(mysql_num_rows($query) == 0)
	echo "false";
else{echo "ola2";
	$menu = "<ul>"
*/

	while($coluna=mysql_fetch_array($query)){
?>
<script type="text/javascript">
	menu += "<li class=\"item\" value=\"" + <//?php echo "$coluna['fun_id']"; ?> + "\">";
	menu += +<//?php echo "$coluna['fun_descricao']"; ?>+;
	menu += "</li>";	
</script>

<?php 
	}
/**/
/*
	$menu += "</ul>";
	echo $menu;
}else*/
	//echo $menu;

include "fecha_conecta_mysql.php";
?>
<script type="text/javascript">
	alert("fim "+menu);
</script>
